Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support to cache filter options #6695

Merged
merged 16 commits into from
Dec 7, 2023
Merged

add support to cache filter options #6695

merged 16 commits into from
Dec 7, 2023

Conversation

khavinshankar
Copy link
Member

@khavinshankar khavinshankar commented Nov 23, 2023

WHAT

🤖[deprecated] Generated by Copilot at b1ca9d8

Persist and sync filters in local storage and URL using useEffect hook. Enhance filtering functionality and UX in useFilters.tsx.

Proposed Changes

  • Added support to cache filters.

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖[deprecated] Generated by Copilot at b1ca9d8

  • Persist and synchronize filters with local storage and URL using useEffect hook (link, link)

@khavinshankar khavinshankar requested a review from a team November 23, 2023 14:30
@khavinshankar khavinshankar requested a review from a team as a code owner November 23, 2023 14:30
Copy link

netlify bot commented Nov 23, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 4420bdd
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/657172ce8b61bd00085e333c
😎 Deploy Preview https://deploy-preview-6695--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

vercel bot commented Nov 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2023 7:23am

Copy link

cypress bot commented Nov 23, 2023

Passing run #1696 ↗︎

0 91 0 0 Flakiness 0

Details:

add support to cache filter options
Project: CARE Commit: 4420bdd693
Status: Passed Duration: 02:25 💡
Started: Dec 7, 2023 7:26 AM Ended: Dec 7, 2023 7:28 AM

Review all test suite changes for PR #6695 ↗︎

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination filters (page, limit, offset) should be blacklisted from being cached right?

@rithviknishad
Copy link
Member

Just noticed, we always end up having 2 API calls for Asset List page only now :/

This at times causes behaviour to ignore the filter because the one with cached filters might respond faster than the one without cached filters. Wonder why the first query is not being aborted (although this same situation works fine by request being aborted in facility and patient list page)

image

@rithviknishad
Copy link
Member

rithviknishad commented Nov 23, 2023

Could be because asset list endpoint is a 301 redirect and fetch is no longer able to cancel it?

@rithviknishad rithviknishad linked an issue Nov 24, 2023 that may be closed by this pull request
1 task
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar added reviewed reviewed by a core member and removed needs review labels Nov 30, 2023
Copy link

github-actions bot commented Dec 4, 2023

👋 Hi, @khavinshankar,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Dec 4, 2023
@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Dec 4, 2023
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Dec 6, 2023
Copy link

github-actions bot commented Dec 6, 2023

👋 Hi, @khavinshankar,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Dec 7, 2023
@nihal467
Copy link
Member

nihal467 commented Dec 7, 2023

LGTM

@gigincg gigincg merged commit f992917 into develop Dec 7, 2023
56 of 60 checks passed
Copy link

github-actions bot commented Dec 7, 2023

@khavinshankar We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

@khavinshankar khavinshankar deleted the cache-filters branch December 10, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cypress passed reviewed reviewed by a core member tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preserve Applied Advance filter in facility page while switching
4 participants